

$(function() {

	
	$(".paihang_right_w  ul li").hover(function() {
		$(".paihang_right_w  ul li").attr("class","");
		$(this).attr("class","dq");
	}, function() {
		$(".paihang_right_w  ul li").attr("class","");
	});
	
	

});
function selectAll(name)
{
	var check=document.getElementsByName(name);
	var ret = 0;
	for(var i=0;i<check.length;i++)
	{
		if(check[i].checked)
		{
			ret++;
			//check[i].checked=false;
		}else{
		    check[i].checked=true;
		}
	}
	if(ret==check.length){
		resetAll(name);
	}
}
function selectAll(name)
{
	var check=document.getElementsByName(name);
	var ret = 0;
	for(var i=0;i<check.length;i++)
	{
		if(check[i].checked)
		{
			ret++;
			//check[i].checked=false;
		}else{
		    check[i].checked=true;
		}
	}
	if(ret==check.length){
		resetAll(name);
	}
}
/**
 * 单选
 * @param allId 全选框的id
 * @param singName 列表中单个选择框的name
 * */
function selectSingle(allId,singlName){
	var check=document.getElementsByName(singlName);
	var allCheck = document.getElementById(allId);
	var ret = 0 ;
	for(var i=0;i<check.length;i++)
	{
		if(check[i].checked)
		{
			ret++;
			//check[i].checked=false;
		}
	}
	if(ret==check.length){
		allCheck.checked = true;
	}else{
		allCheck.checked = false;
	}
}


// --反选被单击---
function ChkOppClick(sonName){
 var arrSon = document.getElementsByName(sonName);
 for(i=0;i<arrSon.length;i++) {
  arrSon[i].click();
 }
}
function resetAll(name)
{
	var check=document.getElementsByName(name);
	for(var i=0;i<check.length;i++)
	{
		if(check[i].checked)
		{
			check[i].checked=false;
		}else{
			
		   // check[i].checked=true;
		}
	}
}